package com.sy.controller;


import com.sy.entity.Osslog;
import com.sy.server.intf.OsslogService;
import com.sy.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/osslog")
public class OsslogController {
    @Autowired
    private OsslogService osslogService;
    //新增
    @PostMapping("/add.do")
    public R save(@RequestBody Osslog osslog){
        return osslogService.save(osslog);
    }
    //删除
    @DeleteMapping("/del.do")
    public R del(int id){
        return osslogService.delById(id);
    }
    //查询
    @GetMapping("/all.do")
    public R all(){
        return osslogService.all();
    }
}